package com.cmys.money.cloudshop.model.product;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "tb_productstyle")
public class ProductStyle implements Serializable {

	private static final long serialVersionUID = -1576683051678822027L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(length = 20, nullable = false)
	private Long id;

	/** 名称 **/
	@Column(length = 20, nullable = false)
	private String name;

	/** 是否可见 **/
	@Column(nullable = false)
	private Boolean visible;

	/** 产品 **/
	@ManyToOne(cascade = CascadeType.REFRESH, optional = false)
	@JoinColumn(name = "productinfo_id")
	private ProductInfo productinfo;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getVisible() {
		return visible;
	}

	public void setVisible(Boolean visible) {
		this.visible = visible;
	}

	public ProductInfo getProductinfo() {
    	return productinfo;
    }

	public void setProductinfo(ProductInfo productinfo) {
    	this.productinfo = productinfo;
    }

}
